<template>
  <div>
    <h1>app</h1>
    <sha-son>
      <!-- v-slot用来替代原来语法 -->
      <!-- 替代无名插槽的写法 -->
      <template>
        <div>
          <h1>{{ name1 }}</h1>
        </div>
      </template>
      <!--  <template slot="slotA">
        <div>
          <h1>{{ name2 }}</h1>
        </div>
      </template> -->
      <template v-slot:slotA>
        <div>
          <h1>{{ name2 }}</h1>
        </div>
      </template>
      <template v-slot:slotB="obj">
        <div>
          <h1>{{ obj }}</h1>
        </div>
      </template>
    </sha-son>
  </div>
</template>

<script>
import ShaSon from "./components/ShaSon.vue";
export default {
  data() {
    return {
      name1: "李思哲",
      name2: "焦子洋",
      name3: "石松峰",
    };
  },
  components: { ShaSon },
};
</script>

<style lang="scss" scoped>
</style>